﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;


namespace Autocentro.Entities
{
    public class VEHICULO:BaseEntity
    {
        public VEHICULO()
        {
            this.PROFORMAs = new List<PROFORMA>();
            this.ORDEN_TRABAJO = new List<ORDEN_TRABAJO>();
        }

        public Int32 Id { get; set; }

        [Display(Name = "IdMarca")]
        [Required(ErrorMessage = "La Marca es requerida")]
        [Range(1, 100000, ErrorMessage = "La Marca es requerida")]
        public Int32 IdMarca { get; set; }

        [Display(Name = "ClienteId")]
        [Required(ErrorMessage = "El cliente es requerido")]
        [Range(1, 100000, ErrorMessage = "El cliente es requerido")]
        public Int32 IdCliente { get; set; }

        [Display(Name = "Placa")]
        [Required(ErrorMessage = "La Placa es requerida")]
        public string Placa { get; set; }

        

        public string NumSerieMotor { get; set; }
        public string Chasis { get; set; }

        [Display(Name = "ModeloVehiculo")]
        [Required(ErrorMessage = "EL Modelo es requerido")]
        public string ModeloVehiculo { get; set; }

        public CLIENTE Cliente { get; set; }
        public MARCA Marca { get; set; }

        public virtual ICollection<PROFORMA> PROFORMAs { get; set; }
        public virtual ICollection<ORDEN_TRABAJO> ORDEN_TRABAJO { get; set; }

        public override string ToString()
        {
            return Placa;
        }

      
        
    }
}
